<html>
<head><meta charset="utf-8"><title>LLVM ICE-breaker group · t-compiler/wg-llvm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/index.html">t-compiler/wg-llvm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html">LLVM ICE-breaker group</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="175345074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/175345074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#175345074">(Sep 10 2019 at 14:58)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="1176">@WG-llvm</span> -- so I want to create this concept of ICE-breakers, and I wanted to start with LLVM bugs. The idea is to pick a topic area (in this case, LLVM) and to prepare:</p>
<ul>
<li>a github alias -- ideally one that people can easily add themselves to!</li>
<li>a guide that gives instructions on how to proceed with these sorts of bugs in general</li>
<li>a label in our issues database (IB-LLVM or something like that)</li>
</ul>
<p>I was hoping to get two bits of feedback here:</p>
<ul>
<li>Some names of folks who'd be interested</li>
<li>Some help preparing or improving a high-level guide</li>
</ul>
<p>I think an LLVM guide would basically include </p>
<p>(a) some tips on bisecting -- at least just pointing to cargo-bisect rustc and mentioning nightlies etc. This should be generally useful.<br>
(b) some tips on how to do dump LLVM IR  -- at least listing out the command line options<br>
(c) maybe some tips on minimization tools?<br>
(d) pointers to the LLVM bug database and a few tips on how to search?</p>
<p>I don't know how people normally go about reducing a bug to an LLVM bug, so any suggestions very welcome. :)</p>



<a name="175345122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/175345122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#175345122">(Sep 10 2019 at 14:58)</a>:</h4>
<p>I'd also like to maybe reach out to LLVM people to see if any of them are interested in being added to the alias...</p>



<a name="175345132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/175345132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#175345132">(Sep 10 2019 at 14:58)</a>:</h4>
<p>I think the target audience is probably people who are somewhat familiar with LLVM already, most realistically.</p>



<a name="175345138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/175345138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#175345138">(Sep 10 2019 at 14:59)</a>:</h4>
<p>Thoughts?</p>



<a name="176224240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224240">(Sep 20 2019 at 19:39)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="1176">@WG-llvm</span> -- can somebody at least point me to some tips on how to see the llvm output when running with rustc? Is <code>-Zsave-temps</code> still a thing? <code>--emit LLVM</code>? I want to write up some docs that basically say:</p>
<p>- here is how you dump IR<br>
- then you can debug from there</p>



<a name="176224322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224322">(Sep 20 2019 at 19:40)</a>:</h4>
<p>I guess <code>--emit llvm-bc</code> maybe?</p>



<a name="176224326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224326">(Sep 20 2019 at 19:40)</a>:</h4>
<p>--emit=llvm-ir is what is usually used, sometimes with -Zno-prepopulate-passes.</p>



<a name="176224365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224365">(Sep 20 2019 at 19:40)</a>:</h4>
<p>llvm-bc is also useful, but pretty much equivalent to llvm-ir for all intents and purposes, except you need an additional steps to make it readable.</p>



<a name="176224414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224414">(Sep 20 2019 at 19:41)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> where does the IR appear in that case?</p>



<a name="176224416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224416">(Sep 20 2019 at 19:41)</a>:</h4>
<p>other useful flags are <code>-Cllvm-arg=*</code> where <code>*</code> allows pretty much everything that tools like <code>llc</code> and <code>opt</code> would accept e.g. -Cllvm-arg=-print-before-all` to print IR before every LLVM pass.</p>



<a name="176224464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224464">(Sep 20 2019 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> it is output as <code>&lt;filename&gt;.ll</code> in your output directory.</p>



<a name="176224524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224524">(Sep 20 2019 at 19:43)</a>:</h4>
<p>e.g. <code>--emit=link,asm,llvm-ir</code> would output <code>mycrate</code> (the binary), <code>mycrate.s</code> and <code>mycrate.ll</code>.</p>



<a name="176224629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224629">(Sep 20 2019 at 19:44)</a>:</h4>
<p>I can't find the option <code>-Zno-prepopulate-passes</code></p>



<a name="176224643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224643">(Sep 20 2019 at 19:44)</a>:</h4>
<p>It's a -C option IIRC</p>



<a name="176224647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224647">(Sep 20 2019 at 19:44)</a>:</h4>
<p>not -Z</p>



<a name="176224751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224751">(Sep 20 2019 at 19:46)</a>:</h4>
<p>Got it</p>



<a name="176224756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224756">(Sep 20 2019 at 19:46)</a>:</h4>
<p>Why do you run that?</p>



<a name="176224764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224764">(Sep 20 2019 at 19:46)</a>:</h4>
<p>Like, why would you want to avoid prepopulating the passes list :)</p>



<a name="176224780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224780">(Sep 20 2019 at 19:46)</a>:</h4>
<p>To get the LLVM IR that rustc generates, not what's left after LLVM is done with it</p>



<a name="176224787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224787">(Sep 20 2019 at 19:47)</a>:</h4>
<p>ok, that's what I figured</p>



<a name="176224933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224933">(Sep 20 2019 at 19:49)</a>:</h4>
<p>We have a fork of LLVM, right? With patches?</p>



<a name="176224936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176224936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176224936">(Sep 20 2019 at 19:49)</a>:</h4>
<p>Where is that located?</p>



<a name="176225016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176225016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176225016">(Sep 20 2019 at 19:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/llvm-project/" target="_blank" title="https://github.com/rust-lang/llvm-project/">https://github.com/rust-lang/llvm-project/</a> though figuring out which branch/commit we're actually using is more easily achieved by looking at the submodule in the rust-lang/rust.git tree</p>



<a name="176225076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176225076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176225076">(Sep 20 2019 at 19:51)</a>:</h4>
<p>oh hey, I just found <a href="https://rust-lang.github.io/rustc-guide/codegen/debugging.html" target="_blank" title="https://rust-lang.github.io/rustc-guide/codegen/debugging.html">this chapter in the rustc-guide</a></p>



<a name="176225077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176225077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176225077">(Sep 20 2019 at 19:51)</a>:</h4>
<p>nice!</p>



<a name="176225093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/LLVM%20ICE-breaker%20group/near/176225093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/LLVM.20ICE-breaker.20group.html#176225093">(Sep 20 2019 at 19:51)</a>:</h4>
<p>this contains most everything I was writing</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>